#pragma once

#include "Component.h"
#include "State.h"

namespace game_engine { namespace components
{

/*!
 * \class Behaviour
 * \brief 
 */
class Behaviour : public Component
{
///////////////////////////////////////////////////////////////////////////////
// Attribute definition
///////////////////////////////////////////////////////////////////////////////
protected:
    State *currentState;

///////////////////////////////////////////////////////////////////////////////
// Method definition
///////////////////////////////////////////////////////////////////////////////
public:
    // Constructors and Destructors
    Behaviour(void);
    Behaviour(GameObject *obj);
    virtual ~Behaviour(void);

    // Others
    // I keep these methods virtual as we could define a derived class to provide
    // specific initialization and finalization methods, for example
    virtual void initialize(void) throw(...);
    virtual void update(const FLOAT32 time);
    //virtual void render(void) throw(...);
    virtual void finalize(void);

    // Getters
    State* getCurrentState(void) const;

    // Setters
    void setCurrentState(State *st);

};

}}
